package com.red.star.wechat.data.entity;

import com.red.star.wechat.data.utils.DateUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.util.Date;

/**
 * @author nofish.yan@gmail.com
 * @date 2018/8/22.
 * 页面访问统计(以天为单位)
 */
@Data
@NoArgsConstructor
@Table(name = "stat_daily_page_view")
public class DailyPageView extends BaseEntity {

    private String mallCode;

    private Integer fansId;

    private String pageUrl;

    private Integer viewCount;

    private Date day;

    public DailyPageView(String mallCode, Integer fansId, String pageUrl, Integer viewCount, String day) {
        this.mallCode = mallCode;
        this.fansId = fansId;
        this.pageUrl = pageUrl;
        this.viewCount = viewCount;
        this.day = DateUtil.getDateAsYYYYMMDD(day);
    }
}
